// vite.config.ts
import { loadEnv } from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/large_battery/node_modules/.pnpm/vite@5.4.11_@types+node@20.17.8_sass-embedded@1.81.0_sass@1.81.0/node_modules/vite/dist/node/index.js";
import path, { resolve } from "path";
import vue from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/large_battery/node_modules/.pnpm/@vitejs+plugin-vue@5.2.1_vite@5.4.11_@types+node@20.17.8_sass-embedded@1.81.0_sass@1.81.0__vue@3.5.13_typescript@5.6.3_/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/large_battery/node_modules/.pnpm/@vitejs+plugin-vue-jsx@4.1.1_vite@5.4.11_@types+node@20.17.8_sass-embedded@1.81.0_sass@1.81.0_4cfylnv6iuiaecadqn5d732pfe/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import { createSvgIconsPlugin } from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/large_battery/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.4.11_@types+node@20.17.8_sass-embedded@1.81.0_sass@1.81.0_/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import svgLoader from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/large_battery/node_modules/.pnpm/vite-svg-loader@5.1.0_vue@3.5.13_typescript@5.6.3_/node_modules/vite-svg-loader/index.js";
import UnoCSS from "file:///C:/Users/14179/Desktop/xiaoyu/vue3/large_battery/node_modules/.pnpm/unocss@0.63.6_postcss@8.4.49_rollup@4.27.4_typescript@5.6.3_vite@5.4.11_@types+node@20.17.8_s_yhfwy62buez6lqomlrxmt5mbzy/node_modules/unocss/dist/vite.mjs";
var __vite_injected_original_dirname = "C:\\Users\\14179\\Desktop\\xiaoyu\\vue3\\large_battery";
var vite_config_default = (configEnv) => {
  const viteEnv = loadEnv(configEnv.mode, process.cwd());
  const { VITE_PUBLIC_PATH } = viteEnv;
  return {
    /** 打包时根据实际情况修改 base */
    base: VITE_PUBLIC_PATH,
    resolve: {
      alias: {
        /** @ 符号指向 src 目录 */
        "@": resolve(__vite_injected_original_dirname, "./src")
      }
    },
    server: {
      /** 设置 host: true 才可以使用 Network 的形式，以 IP 访问项目 */
      host: true,
      /** 端口号 */
      port: 8003,
      /** 是否自动打开浏览器 */
      open: false,
      /** 跨域设置允许 */
      cors: true,
      /** 端口被占用时，是否直接退出 */
      strictPort: true
    },
    build: {
      /** 单个 chunk 文件的大小超过 2048KB 时发出警告 */
      chunkSizeWarningLimit: 2048,
      /** 禁用 gzip 压缩大小报告 */
      reportCompressedSize: false,
      /** 打包后静态资源目录 */
      assetsDir: "static",
      rollupOptions: {
        output: {
          /**
           * 分块策略
           * 1. 注意这些包名必须存在，否则打包会报错
           * 2. 如果你不想自定义 chunk 分割策略，可以直接移除这段配置
           */
          manualChunks: {
            vue: ["vue", "vue-router", "pinia"],
            element: ["element-plus", "@element-plus/icons-vue"]
          }
        },
        external: ["WxLogin"]
      }
    },
    /** 混淆器 */
    esbuild: {
      /** 打包时移除 console.log */
      pure: ["console.log"],
      /** 打包时移除 debugger */
      drop: ["debugger"],
      /** 打包时移除所有注释 */
      legalComments: "none"
    },
    /** Vite 插件 */
    plugins: [
      vue(),
      vueJsx(),
      /** 将 SVG 静态图转化为 Vue 组件 */
      svgLoader({ defaultImport: "url" }),
      /** SVG */
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/icons/svg")],
        symbolId: "icon-[dir]-[name]"
      }),
      /** UnoCSS */
      UnoCSS()
    ],
    css: {
      preprocessorOptions: {
        scss: {
          api: "modern-compiler"
        }
      }
    }
  };
};
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxc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